home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / msdos / edmod.zip / EDMOD.DOC next >
Text File  |  1993-05-10  |  16KB  |  285 lines

  1.        Edit/Modify 1024K Mem and Kiss Disassembler (C) 1977 - 1993
  2.                                0123456789ABCDEF
  3.        ╔═══════════════════════════════════════════════════════════════╗
  4. BEGIN  ║ 0000000000000000000000000000000000000000000000000000000000000 ║ DSseg
  5. 0000   ║ 0000000000000000000000000000000000000000000000000000000000000 ║ 9000
  6.        ║ 0000000000000000000000000000000000000000000000000000000000000 ║
  7. MEMORY ║ 0000000000000000000000000000000000000000000000000000000000000 ║ CSseg
  8. 0000   ║ 0000000000000000000000000000000000000000000000000000000000000 ║ 9000
  9.        ║ 0000000000000000000000000000000000000000000000000000000000000 ║
  10. VALUE  ║ 0000000000000000000  each page displays   0000000000000000000 ║ ESseg
  11. 0000   ║ 0000000000000000000  1024 bytes of memory 0000000000000000000 ║ B800
  12.        ║ 0000000000000000000  in ASCII & extended  0000000000000000000 ║
  13. EDIT   ║ 0000000000000000000  ASCII                0000000000000000000 ║ SSseg
  14. MODE   ║ 0000000000000000000000000000000000000000000000000000000000000 ║ 9000
  15.        ║ 0000000000000000000    zero values are    0000000000000000000 ║
  16. DISAS- ║ 0000000000000000000  displayed as ASCII 0 0000000000000000000 ║ SP
  17. SEMBLY ║ 0000000000000000000000000000000000000000000000000000000000000 ║ FCF6
  18.        ║ 0000000000000000000000000000000000000000000000000000000000000 ║
  19. HEX    ║ 0000000000000000000000000000000000000000000000000000000000000 ║ END
  20. INPUT  ╠═══════════════════════════════╦═══════════════════════════════╣ 03FF
  21.        ║  <Enter> : Up 1024 bytes      ║  <Arrows> : Move cursor       ║
  22. UNUSED ║  <Minus> : Down 1024 bytes    ║   <Mouse> : <- ^ v ->         ║ F1
  23.        ║     <F2> : Toggle modify mode ║      <F5> : Change Seg 0 - F  ║ Help
  24.        ║     <F3> : Hex modify         ║ <Keypad+> : Disassemble Memory║
  25.        ╚═══════════════════════════════╩═══════════════════════════════╝
  26.  
  27. author - Bob Richardson, PO Box 1065, Chautauqua, NY 14722 (716) 753-2654
  28.  
  29. I first wrote EDMOD in 1977 for the original TRS-80 Model 1.  Updated it in
  30. 1980 for the TRS-80 Model 4 with 4 each 64K banks of memory.  Updated it in
  31. 1987 for the Intel 8088.  Updated it in 1993 for the Intel 80386/8046.  If
  32. you would like the modestly commented assembly language source code send a
  33. disk and postage to the author.  EDMOD.OBJ and GOEDMOD.COM are 'freeware.'
  34.  
  35. The programs are assembled using the world's finest and fastest assembler,
  36. A386.COM from: Eric Isaacson Software, 416 East University Avenue, Blooming-
  37. ton, Indiana 47401, phone: (812) 339-1811.  A386.COM is 10 times faster than
  38. either Borland's or Microsoft's assemblers.  He was the author of Intel's
  39. first ASM86 assembler.  EDMOD.OBJ requires an 80386, 80486 or Pentium to run.
  40.  
  41. The EDMOD.OBJ program allows the user to edit/modify any/all 1024K (RAM)
  42. memory, excluding video RAM at segment A000H. GOEDMOD.COM is the command line
  43. loader for EDMOD.OBJ.  EDMOD may be run from either Windows or the command
  44. line prompt.  EDMOD.ICO is the icon if you wish to run it from windows.  EDMOD
  45. uses the keyboard and mouse (if mouse driver is loaded).
  46.  
  47. From the DOS> prompt, type GOEDMOD to run the program.  EDMOD.OBJ, EDMOD.DOC,
  48. EDMOD.ICO (icon), and GOEDMOD.COM may be on any drive and any directory so
  49. long as they are all in the same directory that runs GOEDMOD.COM.
  50.  
  51. When running EDMOD.OBJ these EDMOD.DOC pages may be displayed by pressing the
  52. F7 key.  The Enter, PgUp, PgDwn, and up and down arrow keys are active.
  53.  
  54. Each page displays 1024 bytes of memory in the DS segment displayed at the
  55. upper right of the screen.  Displayed memory starts at BEGIN displayed at the
  56. upper left of the the screen and ends at END displayed on the right side of
  57. the screen. The enter keys (and + keys) move the displayed page UP 1024 bytes
  58. in memory.  The minus key (hyphen key and - key on the keypad) move the
  59. displayed page down 1024 bytes in memory.  The program initializes in EDIT
  60. MODE (green) displayed on the left side of the screen.  If a mouse is
  61. installed, clicking the left mouse button over most commands duplicates
  62. keyboard input.
  63.  
  64. Hoding down the Enter key will display all sixty four 1024 byte pages of a
  65. segment in about 8 seconds and cycle through all 16 segments in about 2 
  66. minutes.  Next segment up or down switching is automatic.
  67.  
  68. In EDIT MODE you may switch segments by pressing the F5 key and then pressing
  69. the zero through F key to switch to segments 0000H:0000H through F000H:0000H. 
  70. When F5 is pressed, four yellow blinking ???? will appear beneath DSseg on the
  71. right side of the screen.  After you have pressed the zero through F, they
  72. will disappear and be replaced by the DS segment value you input. Using a
  73. mouse, you would click over the <F5> and then click over the zero to F on the
  74. second line at the top of the screen to change segments.  In EDIT MODE, MEMORY
  75. on the left of the screen always displays the BEGIN location, VALUE on the
  76. left of the screen displays the hex value of the MEMORY location, the bottom
  77. left of the screen displays the disassembled instruction for the byte/bytes
  78. beginning at the displayed MEMORY location.
  79.  
  80. To switch from EDIT MODE to MODIFY MODE press the F2 key.  EDIT MODE (green)
  81. then changes to MODIFY MODE (yellow = caution) if you are not in the BIOS or
  82. EDMOD memory regions.  If you are in these regions, then MODIFY MODE changes
  83. to red (extreme caution as you may foul up the operating system or EDMOD if
  84. you do not know exactly what you are doing), which does not harm the computer.
  85.  
  86. The large blinking cursor now appears at the top left of the rectangle.  It
  87. may be moved with any of the arrow keys on the key pad, plus Home, PgUp, PgDn,
  88. and End on the keypad.  When the large blinking cursor is moved, MEMORY is
  89. updated, VALUE at the new location is updated, and the disassembled
  90. instruction at the new location is displayed on the bottom left of the screen.
  91. The large blinking cursor may also be moved by clicking the mouse over the new
  92. location desired.  It will beep to tell you that it has moved the cursor. The
  93. mouse cursor is gray and the large blinking cursor bright white.
  94.  
  95. In MODIFY MODE, the keypad's + key will change DISASSEMBLY on the left of the
  96. screen from green to yellow to let you know it is trying to disassemble the
  97. instruction beneath the cursor and then move to the next instruction.
  98. Obviously you must know where an instruction begins for it to logically
  99. disassemble correctly.  If you do not know where an instruction begins keep
  100. pressing the keypad's + key until you find a RET (return) instruction or a
  101. series of PUSH or POPs and it will most likely disassemble correctly
  102. thereafter.  It does not disassemble text correctly, though earlier versions
  103. of EDMOD tested the next 6 bytes and if all ASCII between 30H and 7FH guessed
  104. they were text and told you so, but it was more a hindrance than help, so
  105. removed.  Anyone can identify text since EDMOD displays the ASCII and extended
  106. ASCII characters unless they are control characters. If zero, then an ASCII
  107. 30H zero is displayed so you are not looking at a blank page as illustrated
  108. on the first page of EDMOD.DOC.
  109.  
  110. In MODIFY MODE, pressing any ASCII key will place its value beneath the large
  111. blinking cursor and advance the cursor.  If you wish to input any value in
  112. hex, simply press the F3 key.  Two blinking yellow ?? will appear next to HEX
  113. on the left of the screen and you must now type in two hex values from zero
  114. zero to FF.  After the second value is typed, the blinking ?? will disappear,
  115. the hex value inserted in memory beneath the cursor, and the cursor advanced
  116. one byte.  Needless to say, EDMOD cannot modify ROM memory, which is often at/
  117. above segment C000H.  If you are not sure whether the memory displayed is ROM
  118. or RAM, type in a new value, switch back to EDIT MODE via the F2 toggle key,
  119. move up 1024 bytes, and then down 1024 bytes.  If the value you typed in is
  120. still there it is RAM memory.  If not there, it is ROM or segment A000H video
  121. RAM memory.  EDMOD could do it automatically, but we wanted to leave something
  122. for the user to do.
  123.  
  124. Inspite of dire warnings in the early 1980's that one could harm his/her
  125. computer by modifying memory, we have found this not to be true using a wide
  126. variety of computers.  Maybe some of the early 1980's clones with miserable
  127. substitution BIOS's could have been damaged by modifying the BIOS in segment
  128. zero so that the RAM refresh was bolixed up, but I doubt it.  About the worst
  129. you can do is to modify the BIOS or EDMOD program and lock-up your computer,
  130. requiring either a hot or cold reboot.  In either case no damage is done;
  131. i.e., Debug and Norton Utilities will allow you to do the same thing.
  132.  
  133. EDMOD is not a replacement for Debug, but rather a different approach to
  134. editing and modifying memory.  As once said, 'you pays your money and takes
  135. your choice.'  Since EDMOD is 'freeware' this is irrelevant.
  136.  
  137. If the user wishes to access EDMOD.OBJ from his/her own program:
  138.  
  139.      1. User program loads EDMOD.OBJ's 22000 bytes to 9000:8000H.
  140.      2. User program loads its code segment to 0000H:0300H.
  141.      3. User program goes to EDMOD.OBJ via far jump JMP 9000H:8011H.
  142.      4. User program's first 15 bytes should be NOPs for EDMOD's return.
  143.      5. This allows the user to go to EMOD.OBJ and then return to his/
  144.         her program by pressing the shift F1 keys in EDMOD.
  145.      6. User should be experienced programmer (good luck).
  146.  
  147. We write assembly language IBM touchscreen information systems for hospitals
  148. throughout the U.S. and Canada.  EDMOD is our must useful tool and is often
  149. used 10 to 20 times a day during programming.
  150.  
  151. EDMOD.OBJ contains a number of help/explanation pop-up windows that follow:
  152.  
  153. F1 help key pops up:
  154.  
  155. ╔═════════════════════════════════════════╗
  156. ║          EDMOD.OBJ - MORE HELP          ║
  157. ╠═════════════════════════════════════════╣
  158. ║ EDIT MODE (green)                       ║
  159. ║ Esc key     DOS> prompt or Windows      ║
  160. ║ Shift F1    ret ur pgm if 0000:0300 set ║
  161. ║ F6 key      display any directory       ║
  162. ║ D key       decimal to hex converter    ║
  163. ║ H key       hex to decimal converter    ║
  164. ║ S key       global search ASCII/hex     ║
  165. ║ F8 key      using the KISS disassembler ║
  166. ║ F9 key      zeros out entire segment    ║
  167. ║ F10 key     zeros out displayed page    ║
  168. ║ note:       will not zero BIOS or EDMOD ║
  169. ║ MODIFY MODE (yellow)                    ║
  170. ║ ASCII key   modifies mem beneath cursor ║
  171. ║ F2 key      toggles back to EDIT MODE   ║
  172. ║ F3 key      input hex beneath cursor    ║
  173. ║ keypad      directions keys active      ║
  174. ║ MODIFY MODE (red) if in BIOS or EDMOD   ║
  175. ║ press F7    to display this EDMOD.DOC   ║
  176. ╚═════════════════════════════════════════╝
  177.  
  178. F8 key pressed pops up:
  179.  
  180. ╔═════════════════════════════════════════╗
  181. ║       USING THE KISS DISASSEMBLER       ║
  182. ╠═════════════════════════════════════════╣
  183. ║                                         ║
  184. ║ Press the F4 key to display the 80386   ║
  185. ║ and 80486 instructions disassembled.    ║
  186. ║                                         ║
  187. ║ In MODIFY MODE the lower left corner of ║
  188. ║ of video displays the disassembled      ║
  189. ║ instruction beneath the large cursor.   ║
  190. ║ To disassemble correctly you must start ║
  191. ║ with the cursor over the 1st byte of the║
  192. ║ instruction and then press the keypad + ║
  193. ║ key to advance to the next instruction. ║
  194. ║                                         ║
  195. ║ If you do not know where the instruction║
  196. ║ begins, backup or go forward a byte at  ║
  197. ║ time using the left or right arrow keys ║
  198. ║ until you find a series of PUSH or POPs ║
  199. ║ or a RET. Starting disassembly from     ║
  200. ║ there will most likely be correct.      ║
  201. ╚═════════════════════════════════════════╝
  202.  
  203. F4 key pressed pops up:
  204.  
  205. ╔═════════════════════════════════════════╗
  206. ║      KEEP IT SIMPLE DISASSEMBLER        ║
  207. ╠═════════════════════════════════════════╣
  208. ║ Most all 8088/80286 instructions display║
  209. ║ with > 95% accuracy (indexed excluded). ║
  210. ║                                         ║
  211. ║   80386/80486 INSTRUCTIONS DISPLAYED    ║
  212. ║                                         ║
  213. ║ ADD Ereg,Ereg   MUL Ereg                ║
  214. ║ OR  Ereg,Ereg   DIV Ereg                ║
  215. ║ ADC Ereg,Ereg   MOV Ereg, 32 bit value  ║
  216. ║ SBB Ereg,Ereg   MOV Ereg, [memory]      ║
  217. ║ AND Ereg,Ereg   MOV EAX,  [index reg]   ║
  218. ║ SUB Ereg,Ereg   MOV [memory],Ereg       ║
  219. ║ XOR Ereg,Ereg   MOV Ereg,Ereg           ║
  220. ║ CMP Ereg,Ereg   MOVSD move $ doubleword ║
  221. ║ INC Ereg        STOSD stor $ doubleword ║
  222. ║ DEC Ereg        other instructions      ║
  223. ║ POP Ereg              display           ║
  224. ║ PUSH Ereg       "80386 instruction"     ║
  225. ║              (math coprocessor excluded)║
  226. ╚═════════════════════════════════════════╝
  227.  
  228. HOW EDMOD.OBJ IS CREATED:
  229.  
  230. EDMOD.COM is a plain vanilla .COM program that moves itself up to modestly
  231. high memory in segment 9000H at offset 8000H.  It is not a terminate-and-stay-
  232. resident program.  After moving itself high it first saves 9000H:8000H and up
  233. 22000 bytes on drive A:\ as EDMOD.OBJ.  Thereafter, it operates identically to
  234. EDMOD.OBJ.
  235.  
  236. GOEDMOD.COM, the tiny 200 byte or so command line loader for EDMOD.OBJ simply
  237. loads it to 9000H:8000H and then does a far jump to 9000H:8011H.  Before
  238. loading EDMOD.OBJ high, GOEDMOD.COM loads a 4FH ('O') pointer into segment
  239. 0000H at offset 0382H which is part of the unused interrupt E0H location. This
  240. normally vacant location tells the program not to create EDMOD.OBJ on A:\
  241. after it is moved up and then accessed by the far jump 9000H:8011H.  EDMOD.OBJ
  242. is not a terminate-and-stay-resident program.  As such, if you are accessing
  243. it from your own program after it has once been loaded, test 9000H:8000H for
  244. an E9H byte (jump instruction), and if not there, re-load it before jumping to
  245. 9000H:8011H.  From a hard disk it loads in less than a second.
  246.  
  247. Since all calls and jumps within a .COM program are relative offsets, they
  248. work properly.  Only the MOV CS:register,label and LEA CS:register,label need
  249. the modifier +7F00H be added to the label; i.e., LEA CS:DI,MESS becomes LEA
  250. CS:DI,MESS+7F00H to load the effective address of the 'Edit/Modify 1024K'
  251. message that is displayed at the top of the screen.
  252.  
  253. SETTING UP EDMOD TO RUN IN WINDOWS 3.1:
  254.  
  255. On drive C's root directory (C:\) type MD EDMOD (make directory) and press
  256. Enter.  GO to the C:\EDMOD subdirectory.  Assuming that the uzipped files
  257. GOEDMOD.COM, EDMOD.DOC, EDMOD.ICO and EDMOD.OBJ are in A:\ drive, copy them to
  258. C:\EDMOD.  Now type WIN to go to Windows.
  259.  
  260. Under [FILE] click New.  Click Program Item.  In description type EdMod.  In
  261. Command Line type GOEDMOD.COM  In working directory type C:\EDMOD and click
  262. Change Icon.  If EDMOD.ICO appears click Ok and continue.
  263.  
  264. If for some reason Windows tells you it cannot find it, click OK and then
  265. click [Browse].  Change the directory to C:\EDMOD and click [OK].  Now, click
  266. EDMOD.ICO and you are all set.  Finish up and the EDMOD icon will appear in
  267. whatever directory you installed it in.
  268.  
  269. Double click the EDMOD icon and presto-change-oh you are in EDMOD at segment
  270. 9000H offset 0000H.  Pressing the Esc key will return you to Windows.
  271.  
  272. BULLETIN BOARD SYSTEMS:
  273.  
  274. Feel free to upload EDMOD.OBJ, EDMOD.DOC, EDMOD.ICO and GOEDMOD.COM to any
  275. BBS you wish.  Our only condition/request is that you not modify or change
  276. EDMOD.DOC in any way or fashion.
  277.  
  278. NEXT UPGRADE:
  279.  
  280. The next upgrade to EDMOD.OBJ will include disassembly of many of the Intel
  281. 'Pentium' (tm) instructions plus options to display all bank switched expanded
  282. memory.  Hopefully, another option will display all memory in protected mode.
  283.  
  284.                                 - end -
  285.